#pragma once
#include "MetricLearner.h"

class MahalanobisMetricLearner :
	public SingleVariateMetricLearner
{
public:
	MahalanobisMetricLearner(FMLKRGeneralizer* p);
	virtual ~MahalanobisMetricLearner(void);

	void transform(Observation newst, Action a, int dim); 
	void transformInMatlab(ANNpointArray& data, int size, Action a, int dim);

	void learnTransformation(); //this is obsolete here because we're now calling the individual dimensions directly (to allow parallelization)
	int learnTransformation(ANNpointArray& data, Observation_type*& targets, int size, int action, int dim); 
	void submitAPCChanges(int action, int dim); 
public:
	
	MatlabMatrix< MatlabMatrix<double>* >* A; 
	MatlabMatrix< MatlabMatrix<double>* >* pc; 

	MatlabMatrix<double>* threadA; 
	MatlabMatrix<double>* threadPc; 
};
